Electrochromic devices include an electrolyte layer. Normally, glass based electrochromic devices utilize liquid electrolytes because fast ionic transport (conductivity greater than 10 mS/cm) is desired. To improve device stability, especially in flexible electrochromic devices, gel or solid electrolytes would be preferred. However, devices using solid and gel electrolytes often suffer from low device performance due to reduced ionic conductivity. Therefore, there remains a need for electrolytes for electrochromic devices that offer stability but do not compromise device performance.